<template>
  <div class="bw-group-container">
    <div class="bw-group-header">
      <div class="bw-group-header-wrap">
        <span class="bw-group-header-title"> {{ title }} </span>
      </div>
      <div class="bw-group-header-tool"></div>
    </div>

    <div class="bw-group-content">
      <slot></slot>
    </div>
  </div>
</template>

<script lang="ts" setup>
interface BwGroupProps {
  title: string
}
const emit = defineEmits([])
withDefaults(defineProps<BwGroupProps>(), {
  title: '',
})
</script>
<style lang="less" scoped>
.bw-group-container {
  width: 100%;
  height: auto;
  background-color: #fff;

  .bw-group-header {
    height: 48px;
    display: flex;
    width: inherit;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;

    .bw-group-header-wrap {
      flex: 1;
      flex-shrink: 0;
      font-size: 18px;

      .bw-group-header-title {
        flex-shrink: 0;
        max-width: 192px;
        color: #171a1d;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .bw-group-header-tips {
        color: #40a9ff;
        margin-left: 8px;
      }
    }

    .bw-group-header-tool {
      .bw-group-expand {
        transform: rotate(180deg);
      }
    }
  }

  .bw-group-content {
    padding: 0 24px;
  }
}
</style>
